package com.semeureka.fault.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.semeureka.fault.bean.Rawdata;
import com.semeureka.fault.dao.RawdataDao;
import com.semeureka.fault.service.RawdataService;
import com.semeureka.fault.util.Message;

@Component
@Transactional
public class RawdataServiceImpl implements RawdataService {
	@Autowired
	private RawdataDao rawdataDao;

	@Override
	public void update(Message message) {
		if (message instanceof Rawdata) {
			Rawdata rawdata = (Rawdata) message;
			rawdataDao.save(rawdata);
		}
	}
}
